package com.zzw.service.Impl;

import com.zzw.bean.SysDictType;
import com.zzw.bean.SysDictTypeExample;
import com.zzw.dao.SysDictTypeMapper;
import com.zzw.service.SysDictTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysDictTypeServiceImpl implements SysDictTypeService {

    @Resource
    private SysDictTypeMapper sysDictTypeMapper;

    @Override
    public List<SysDictType> listByCondition(SysDictType sysDictType) {
        return sysDictTypeMapper.selectByExample(new SysDictTypeExample());
    }

    @Override
    public int save(SysDictType sysDictType) {
        return sysDictTypeMapper.insertSelective(sysDictType);
    }

    @Override
    public int update(SysDictType sysDictType) {
        return sysDictTypeMapper.updateByPrimaryKeySelective(sysDictType);
    }

    @Override
    public int delete(Integer dicId) {
        return sysDictTypeMapper.deleteByPrimaryKey(dicId);
    }
}
